lib: remove optional builtins prefixes from prelude functions#447402
Conversation
Remove optional builtins prefixes from prelude functions by running:
builtins=(
abort
baseNameOf
break
derivation
derivationStrict
dirOf
false
fetchGit
fetchMercurial
fetchTarball
fetchTree
fromTOML
import
isNull
map
null
placeholder
removeAttrs
scopedImport
throw
toString
true
)
fd --type file . lib --exec-batch sed --in-place --regexp-extended "
s/\<builtins\.($(
printf '%s\n' "${builtins[@]}" |
paste --delimiter '|' --serial -
))\>/\1/g
"
nix fmt
|
I am also for reverting documentation and comments changes |
Q: does the release test still cover various implementations of nix, e.g. lix & snix? I know historically they haven't had full parity with builtins, e.g. lix doesn't (didn't?) have |
IIUC, https://gerrit.lix.systems/c/lix/+/2248 is supposed to, or will, fix this.
Good point. I suggest halting merging of the remaining PRs until we know the answer to this, although they can still be reviewed. I marked them as draft to indicate this. Since I am unfamiliar with Lix, pinging the following people hopefully brings more qualified people into the discussion: @lf-, @Qyriad. Seems like this is not a totally "safe" PR after all:
Hopefully, my lack of experience and foresight with such large-scale projects has not caused any trouble. If it did, feel free to revert #447401 and #447402 ASAP. |
|
No need to worry. It's all working appropriately. Returns: Snix is not yet published in Nixpkgs at all. It's missing the following:
We can ignore that. Snix will catch up, and these aren't core functions. |
Establish the builtins prefix convention for prelude attributes to
progress [1] ("Unwritten style guides should be written"), following the
treewide removal of the builtins prefix for prelude attributes [2] [3]
[4] [5] [6].
[1]: NixOS#387072
[2]: NixOS#444432
[3]: NixOS#447401
[4]: NixOS#447402
[5]: NixOS#447403
[6]: NixOS#447404
Related PRs intentionally split up to simplify review and merging:
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.